
<?php 
if (!empty($this->flash_messages))
{
    foreach ($this->flash_messages as $flash_message)
    {
        echo '<div class="message">'.$flash_message.'</div>';
    }
}
?>

<?php if (!empty($this->message)) : ?>
<div class="message"><?php echo $this->message ?></div>
<?php endif; ?>

<div id="search-form">
<?php echo $this->form ?>
</div>

<div class="clear"></div>

<?php if (!empty($this->results)) : ?>
    <?php foreach($this->results as $result) : ?>
        <div class="search-result-item">
            <h3>
                <?php if (!empty($result['url'])) : ?>
                    <a href="<?php echo $this->fixUrl('node/view/'.$result['url']) ?>"><?php echo htmlspecialchars($result['title']) ?></a>
                <?php else : ?>
                    <a href="<?php echo $this->fixUrl('node/id/'.$result['id']) ?>"><?php echo htmlspecialchars($result['title']) ?></a>
                <?php endif; ?> 
            </h3>
            <p><?php echo $result['content'] ?></p>
        </div>
    <?php endforeach; ?>
    
    <?php echo $this->paginator ?>
    
<?php endif; ?>

